{{/* vim: set filetype=mustache: */}}
{{/*
Kubernetes standard labels
*/}}
{{- define "common.labels.standard" -}}
app.kubernetes.io/name: {{ include "common.names.name" . }}
helm.sh/chart: {{ include "common.names.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
tongtech/instance-name:  {{ .Values.tongtech.instance.name }}
tongtech/instance-component: instance
tongtech/tenant-name: {{ .Values.tongtech.tenant.name }}
tongtech/business-name: {{ .Values.tongtech.business.name }}
tongtech.tongmmp.prometheus/scraped-by: {{ .Values.metrics.enabled | quote }}
{{- end -}}

{{/*
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
*/}}
{{- define "common.labels.matchLabels" -}}
app.kubernetes.io/name: {{ include "common.names.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
tongtech/instance-name:  {{ .Release.Name }}
tongtech/instance-name:  {{ .Values.tongtech.instance.name }}
{{- end -}}
